﻿//
// Created by francklinson on 2021/3/22.
//

#ifndef CPPPRIMERPLUSREADINGCODES_TIME_H
#define CPPPRIMERPLUSREADINGCODES_TIME_H
#include <iostream>


class Time
{
private:
    int hours;
    int minutes;
public:
    Time();
    Time(int h, int m = 0);
    void AddMin(int m);
    void AddHr(int h);
    void Reset(int h = 0, int m = 0);
    Time operator+(const Time & t) const;
    Time operator-(const Time & t) const;
    Time operator*(double n) const;
    void Show() const;
    friend Time operator*(double m, const Time & t); // goes in class declaration
    friend std::ostream & operator<<(std::ostream &os,const Time &t);
};

#endif //CPPPRIMERPLUSREADINGCODES_TIME_H
